# 编译时下载源码(此处指定源码的地址)
baremetal_src:=$(wrkdir_src)/baremetal
baremetal_repo:=https://gitee.com/tupeloshen/bao-baremetal-guest.git 
baremetal_branch:=master

# 执行git clone
$(baremetal_src):
	git clone $(baremetal_repo) $@ --branch $(baremetal_branch)

# 指定编译依赖关系
baremetal_bin:=$(baremetal_src)/build/$(PLATFORM)/baremetal.bin
baremetal $(baremetal_bin): $(baremetal_src)
	$(MAKE) -C $(baremetal_src) PLATFORM=$(PLATFORM)

# 定义函数,供其它模块调用
define build-baremetal
$(strip $1): $(baremetal_bin)
	cp $$< $$@
endef